def jian(m):
    dp=[0]*(m+1)
    dp[0]=1
    for i in range(1,m+1):
        dp[i]=dp[i-1]+dp[0]
    return dp[m]
m=int(input())
n=int(input())
sum=0
for i in range(m-1,n):
    sum+=jian(i)
print(sum)

